import App from './App'

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'

// #endif

import {
	Request
} from 'components/config/Request.js'
import {
	Config
} from 'components/config/config.js'
import {
	DB
} from "components/config/db.js"
import Loading from './components/Loading/Loading.vue'
import StatusBar from "components/header/StatusBar.vue"
import cuCustom from './components/header/cu_custom.vue'

Vue.component('StatusBar', StatusBar);
Vue.component('cu-custom', cuCustom);
Vue.component('Loading', Loading)

Vue.prototype.$Reques = new Request();
// Vue.prototype.$DB=new DB();
Vue.prototype.$Config = Config;

// plus.navigator.closeSplashscreen();
// plus.navigator.setFullscreen(false); //设置全屏
// plus.screen.lockOrientation('portrait-primary'); //横屏操作
// plus.navigator.hideSystemNavigation(); //隐藏系统的虚拟按键

Vue.prototype.getInfo = () => {
	return new Promise((resolve, reject) => {
		uni.getSystemInfo({
			success: (e) => {
			// #ifndef MP
			Vue.prototype.StatusBar = e.statusBarHeight;
			if (e.platform == 'android') {
				Vue.prototype.CustomBar = e.statusBarHeight ;
			} else {
				Vue.prototype.CustomBar = e.statusBarHeight ;
			};
			// #endif
				let dat = {
					CustomBar: Vue.prototype.CustomBar
				}
			resolve(dat);
			}
		});
	})
}


const app = new Vue({
	...App
})
app.$mount()



